<html><head><title>Generate a Scope Argument for Stepwise GAMLSS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>gamlss.scope(gamlss)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   gamlss.scope">
<param name="keyword" value=" Generate a Scope Argument for Stepwise GAMLSS">
</object>


<h2>Generate a Scope Argument for Stepwise GAMLSS</h2>


<h3>Description</h3>

<p>
Generates a scope argument for a stepwise GAMLSS.
</p>


<h3>Usage</h3>

<pre>
gamlss.scope(frame, response = 1, smoother = "cs", arg = NULL, form = TRUE)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>frame</code></td>
<td>
a data or model frame</td></tr>
<tr valign="top"><td><code>response</code></td>
<td>
which variable is the response; the default is the first</td></tr>
<tr valign="top"><td><code>smoother</code></td>
<td>
what smoother to use; default is <code>cs</code></td></tr>
<tr valign="top"><td><code>arg</code></td>
<td>
any additional arguments required by the smoother</td></tr>
<tr valign="top"><td><code>form</code></td>
<td>
should a formula be returned (default), or else a character version of the formula </td></tr>
</table>

<h3>Details</h3>

<p>
Each formula describes an ordered regimen of terms, each of which is eligible on their own for 
inclusion in the gam model. 
One of the terms is selected from each formula by step.gam. 
If a 1 is selected, that term is omitted.
</p>


<h3>Value</h3>

<p>
a list of formulas is returned, one for each column in frame (excluding the response). 
For a numeric variable, say x1, the formula is
<br>
~ 1 + x1 + cs(x1)
<br>
If x1 is a factor, the last smooth term is omitted.</p>

<h3>Author(s)</h3>

<p>
Mikis Stasinopoulos: a modified function from Statistical Models in S
</p>


<h3>References</h3>

<p>
Chambers, J. M. and Hastie, T. J. (1991). <EM>Statistical Models in S</EM>, Chapman and Hall, London. 
</p>
<p>
Rigby, R. A. and  Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), 
<EM>Appl. Statist.</EM>, <B>54</B>, part 3, pp 507-554.
</p>
<p>
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS  help files, (see also  <a href="http://www.gamlss.com/">http://www.gamlss.com/</a>).
</p>
<p>
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R.
<EM>Journal of Statistical Software</EM>, Vol. <B>23</B>, Issue 7, Dec 2007, <a href="http://www.jstatsoft.org/v23/i07">http://www.jstatsoft.org/v23/i07</a>.
</p>


<h3>See Also</h3>

<p>
<code><a href="stepGAIC.html">stepGAIC</a></code>
</p>


<h3>Examples</h3>

<pre>
data(usair)
gs1&lt;-gamlss.scope(model.frame(y~x1+x2+x3+x4+x5+x6, data=usair))
gs2&lt;-gamlss.scope(model.frame(usair))
gs1
gs2
gs3&lt;-gamlss.scope(model.frame(usair), smooth="fp", arg="3")
gs3 
</pre>



<hr><div align="center">[Package <em>gamlss</em> version 1.7-9 <a href="00Index.html">Index]</a></div>

</body></html>
